package com.zmn.oms.common.dio.wallquotation;

import com.zmn.mcc.dubbo.dto.DubboConsts;
import com.zmn.oms.common.dto.OmsOperator;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.List;

/**
 * 墙面报价详细信息
 *
 * @author chengguang
 * @date 2022/05/25
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class WallQuotationDetailDIO extends OmsOperator implements Serializable {

    private static final long serialVersionUID = 1228301764770492186L;

    @ApiModelProperty("产品id")
    @NotNull(message = "productId不能为空")
    @Positive(message = "productId必须大于0")
    private Integer productId;

    @ApiModelProperty("产品名称")
    @NotBlank(message = "产品名称不能为空")
    private String productName;

    @ApiModelProperty("故障id集合")
//    @NotEmpty(message = "faultIds参数不能为空且个数不能超过" + DubboConsts.DUBBO_RESULT_MAX_NUMBER)
//    @Size(min = 1, max = DubboConsts.DUBBO_RESULT_MAX_NUMBER,message = "faultIds参数不能为空且个数不能超过" +
//            DubboConsts.DUBBO_RESULT_MAX_NUMBER)
    private List<Integer> faultIds;

    @ApiModelProperty("人工优惠金额")
    @NotNull
    private Integer laborPreferencePrice;

    @ApiModelProperty("介绍单照片")
    @NotBlank(message = "introductionSheetImg不能为空")
    private String introductionSheetImg;

    @ApiModelProperty("服务项信息集合")
    @NotEmpty(message = "wallServItems参数不能为空且个数不能超过" + DubboConsts.DUBBO_RESULT_MAX_NUMBER)
    @Size(min = 1, max = DubboConsts.DUBBO_RESULT_MAX_NUMBER,message = "wallServItems参数不能为空且个数不能超过" +
            DubboConsts.DUBBO_RESULT_MAX_NUMBER)
    private List<WallServItemDIO> wallServItems;

    /**
     * 服务价格 = 原价 + 优惠总额
     */
    @ApiModelProperty("服务价格")
    @NotNull
    private Integer servicePrice;

    /**
     * 合计价格 = 商品原价 - 优惠总额 单位：分
     */
    @ApiModelProperty("合计价格")
    @NotNull
    private Integer amountPrice;

    @ApiModelProperty("已使用优惠")
    private List<WallDiscountDIO> wallDiscounts;

}
